import java.awt.*;
import javax.swing.*;
import javax.swing.UIManager.*;

public class CalendarMain extends JFrame{

        private JPanel p;

        CalendarMain(){
                super("Calendar");
                try {
                        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                                if ("Nimbus".equals(info.getName())) {
                                UIManager.setLookAndFeel(info.getClassName());
                                break;
                                }else{
                                        UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                                }
                        }
                } catch (Exception e) {
                }
                setLayout(new GridLayout(1,1));
                setSize(322,450);
                setResizable(false);
                Days d= new Days();
                add(d);
                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                // Determine the new location of the window
                int w = this.getSize().width;
                int h = this.getSize().height;
                int x = (dim.width-w) - 30;
                int y = 15;
                // Move the window
                setLocation(x, y);
        }

        public static void main(String aggsp[]) {
                CalendarMain c = new CalendarMain();
                c.setVisible(true);
                c.setDefaultCloseOperation(EXIT_ON_CLOSE);
        }
}

